package sample.plugin;
 
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * Says "Hi" to the user.
 *
 */
@Mojo( name = "sayhi")
public class GreetingMojo extends AbstractMojo
{
    @Parameter( property = "sayhi.greeting", defaultValue = "Hello World!" )
    private String greeting;

    @Parameter
    private boolean myBoolean;

    /**
     * 只需要主类添加对象， 对象内部的属性，以及 对象的对象的属性都不需要添加
     */
    @Parameter
    private final Test123 test = new Test123();


    public void execute() throws MojoExecutionException
    {
        getLog().info( "Hello, world." );
        getLog().info( this.greeting );
        getLog().info( String.valueOf(this.myBoolean));
        getLog().info( test.getFengliulin());
        getLog().info( test.getTest1234().getFengliulin());
    }
}